package com.lhd.qd.websocket;

import com.lhd.qd.common.util.JacksonUtils;

import javax.websocket.Encoder;
import javax.websocket.EndpointConfig;

public class WsEncoder implements Encoder.Text<WsResult>  {
    @Override
    public String encode(WsResult wsResult) {
        return JacksonUtils.toStr(wsResult);
    }
    @Override
    public void init(EndpointConfig endpointConfig) { }

    @Override
    public void destroy() { }
}
